/*
 * Copyright (c) 2010-2017 EEFUNG Software Co.Ltd. All rights reserved. 版权所有(c)2010-2017湖南蚁坊软件有限公司。保留所有权利。
 */
package com.spring.hystrix;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 功能描述,该部分必须以中文句号结尾。
 *
 * @author panqingcui
 * @create 2017-02-22 09:52
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
public class CircuitBreakerApplication {
    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }

    public static void main(String[] args) {
        SpringApplication.run(CircuitBreakerApplication.class, args);
    }
}
